Reducing lock occurrences in server/database systems

ABSTRACT

Limiting the number of concurrent requests in a database system. Arranging requests to be handled by the database system in at least one queue. Defining a maximum value (SS) of concurrent requests corresponding to the at least one queue. Monitoring at least one queue utilization parameter corresponding to the at least one queue and calculating a performance value based on the at least one queue utilization parameter. Adapting the maximum value (SS) of concurrent requests of the at least one queue dynamically based on the performance value (PF) in order to improve system performance. Limiting the number of concurrent requests of the at least one queue dynamically based on the dynamically adapted maximum value (SS).

CROSS REFERENCE

The present application is a continuation of and claims the benefit ofpriority of U.S. patent application Ser. No. 13/964,429, filed on Aug.12, 2013, which claims the benefit of priority of United Kingdom PatentApplication Serial Number 1219442.9, filed Oct. 30, 2012 with the UnitedKingdom Intellectual Property Office, the contents of which are hereinincorporated by reference in its entirety.

BACKGROUND

The present invention relates generally to the field of databasesystems, especially database systems with a server to access thedatabase. More specifically, the present invention is related to amethod and a system for limiting the number of concurrent requests in adatabase system and therefore reducing lock occurrences inserver/database systems.

In conventional client-server architectures, one or more nodes areconnected to one or more servers via a network that allows forbi-directional communication between a client and a server. Typically, aserver receives requests from multiple sources and handles themaccording to a defined processing scheme. Most commonly, a first-infirst-out (FIFO) approach is used allowing for the first receivedrequest to be handled first by the server, the second request to behandled second, and so forth. In database systems incoming requests ofthe clients are handled using queues to organize the sequentialarrangement of the requests.

The quality of service in a given client-server architecture isestablished based on the latency between a request being sent to aserver and the time the requesting client receives a response from theserver. The higher the load on a server, the more likely it is that thelatency for receiving a response is increased. In many cases, theclients have built-in mechanisms that use “timeout” facilities to avoidwaiting long periods of time for a request to be answered. In suchcases, the request is aborted, and even if results are directed to therequesting client from the server, the requesting client ignores theresults, or is unable to receive them as the connection has beenterminated already by a client. In some applications, the clientgenerates another request with the expectation that this request will beanswered within the allotted time frame. This scheme may result inadditional loading of the server's queue, thereby causing additionaldelays in the server's response time.

In large database environment with many clients connecting to the serverto send requests to be processed and pushed to the database, databaseoperations can become bottleneck and affect overall system performance.When the system performance is decreased, clients cannot connect to theserver. Typically they are trying to get a connection later on, i.e. thenumber of server connections is increasing. It results in a downwardspiral because the server has so many incoming connections that thedatabase performance is decreased by resource-consuming lock handling.The poor database performance results in delays in request-processingwhich in turn increases the number of concurrent requests to beprocessed.

In addition, a request that waits to long on a server may be consideredas failure, even though it was eventually processed by the server,because a time-out was triggered.

Therefore, it would be advantageous to have a mechanism for handlingoverload situations in a client-server environment. More specifically,it would be advantageous to have a mechanism that actively avoidstime-out situations and allows the system to achieve maximum throughput.

SUMMARY

It is an objective of embodiments of the invention to provide for animproved computer-implemented method, computer-readable medium andcomputer system for limiting the number of concurrent requests in adatabase system. The objective is solved by the features of theindependent claims. Preferred embodiments are given in the dependentclaims. If not explicitly indicated otherwise, embodiments of theinvention can be freely combined with each other.

In one aspect, the invention relates to a computer-implemented methodfor limiting the number of concurrent requests in a database systemcomprising the following steps:

arranging requests to be handled by the database system in at least onequeue;

defining a maximum value of concurrent requests corresponding to the atleast one queue;

monitoring at least one queue utilization parameter corresponding to theat least one queue and calculating a performance value based on the atleast one queue utilization parameter,

adapting the maximum value of concurrent requests of the at least onequeue dynamically based on the performance value in order to improvesystem performance and

limiting the number of concurrent requests of the at least one queuedynamically based on the dynamically adapted maximum value.

For example, the at least one queue utilization parameter is the averageprocessing time of requests, the number of served requests, the numberof rejected requests, the ratio of rejected requests with respect to thetotal number of requests in a certain period of time or a parameterbased on a calculation combining at least two of the upper mentionedparameters etc. Furthermore, the at least one queue utilizationparameter can be derived from an information about the statisticaldistribution of time needed to process a request, e.g. minimumprocessing time, maximum processing time, range of processing time,deviation of processing time, variation of processing time, etc.

The features may be advantageous as it is possible run the databasesystem at its peak performance depending on the load of the databaseserver. If there is only marginal load, i.e. the performance factor islow, the number of concurrent queued requests is increased dynamically.Reversely, if the system performance is degrading, the number ofconcurrent queued requests is decreased to enable the system to handlethe requests without timeout of requests.

According to preferred embodiments, the requests are grouped in at leasttwo groups, where each group is associated with a dedicated queue and aqueue-specific maximum value of concurrent requests. Especially inenvironments with a huge number of incoming requests, the databaseperformance is consumed by lock handling. Preferably requests arearranged in groups according to the likelihood of locking with eachother. Requests that will lock with each other more likely will beassigned to the same group. Reversely, requests with a low likelihood oflocking with each other will be assigned to different groups. Forexample, grouping can also be done according to the service ID of theservice which triggered the request, according to a learning mechanismanalyzing the exception stack to identify the interfering services etc.

According to preferred embodiments, the number of concurrent requests islimited by rejecting incoming requests before insertion into the queueand/or by removing requests out of the queue. Preferably, the number ofconcurrent requests is only changed in small steps to adapt it to thecurrent system performance in a smooth way. This is done by rejectingincoming requests before insertion into the queue. If a lock-timeoutevent occurred, the system performance should be raised quickly.Therefore the number of concurrent requests already queued is decreasedto allow the system to come up rapidly.

According to preferred embodiments, the performance value is calculatedfor a first period of time, where the performance value of the firstperiod of time is used to adapt the maximum value of concurrent requestsin a second period of time, which immediately follows after the firstperiod of time. Preferably, the performance value of the first period oftime is compared with the performance value of the second period of timeto determine the variation of the performance value. To improve thesystem performance dynamically, the variation of the performance valueis used to adapt the number of concurrent requests.

According to preferred embodiments, the maximum value of concurrentrequests is handled by a counting semaphore. The advantage of using acounting semaphore is that the state of the respective queue(open/close) and the number of concurrent requests can be handledsimultaneously. Thereby it is possible to determine, if an incomingrequest assigned to a group can be inserted into the queue or has to berejected (open/close). Additionally the maximum value of concurrentrequests can be retrieved out of the semaphore.

According to preferred embodiments, the maximum value of concurrentrequests is chosen to maximize the product of number of concurrentrequests and average processing time of a request. Plotting the productof number of concurrent requests and average processing time against thenumber of concurrent requests shows a peak value. At this peak value thebest system performance is achieved. Therefore the maximum value ofconcurrent requests is chosen according to that peak value.

According to preferred embodiments, the maximum length of the at leastone queue is adapted dynamically based on the maximum value ofconcurrent requests and the average processing time of requests. Therebynot only the number of requests inserted into the queue is changed butalso the total length of the queue to adapt the queue-specificparameters to the current system performance.

According to preferred embodiments, after receiving a lock time-out ofthe database the maximum value of concurrent requests and the maximumlength of the at least one queue is decreased in order to avoid furtherlock time-outs. In general, using the method according to the inventionit is rather unlikely that lock-timeouts occur. Nevertheless, after alock-timeout event emerged, the decreasing of the number of concurrentrequests and the length of the at least one queue enables the system tocome up rapidly and therefore avoid further lock-timeouts.

In a further aspect, the invention relates to a computer-readable mediumcomprising computer-readable program code embodied therewith which, whenexecuted by a processor, cause the processor to execute a methodaccording to anyone of the embodiments specified above.

In a further aspect the invention relates to a computer-based databasesystem comprising at least one server acting as a database clientcomprising:

a dispatcher unit adapted to arrange requests to be handled by thedatabase in at least one queue;

a monitoring unit adapted to;

define a maximum value of requests corresponding to the at least onequeue to be processed concurrently;

monitor at least one queue utilization parameter corresponding to the atleast one queue and to calculate a performance value based on the atleast one queue utilization parameter,

adjust the maximum value of concurrent requests of the at least onequeue dynamically based on the performance value in order to improvesystem performance and

a limiting unit adapted to limit the number of concurrent requests ofthe at least one queue dynamically based on the dynamically adaptedmaximum value.

According to preferred embodiments, the dispatcher unit is adapted togroup the requests in at least two groups, where each group isassociated with a dedicated queue and a queue-specific maximum value ofconcurrent requests.

According to preferred embodiments, the dispatcher unit is adapted toassign a request to a group based on the likelihood of locking of therequest with other requests contained in the group, based on the originof the request or based on the service type of the request.

According to preferred embodiments, the system is adapted to limit thenumber of concurrent requests by rejecting incoming requests beforeinsertion in the queue and/or by removing requests out of the queue.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

In the following, preferred embodiments of the invention will bedescribed in greater detail by way of example, only making reference tothe drawings in which:

FIG. 1 shows a database system based on a client-server environment;

FIG. 2 shows an example of a queue with inserted requests to beprocessed by the server;

FIG. 3 shows a schematic diagram of the server according to theinvention;

FIG. 4 shows a flow chart for dynamically limiting the concurrency ofrequests depending on the current system performance;

FIG. 5 shows a flow chart for dynamically adapting the queue propertiesbased on system performance.

DETAILED DESCRIPTION

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit”, “module” or “system”.Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon. Anycombination of one or more computer readable medium(s) may be utilized.The computer readable medium may be a computer readable signal medium ora computer readable storage medium. A computer readable storage mediummay be, for example, but not limited to, an electronic, magnetic,optical, electromagnetic, infrared, or semiconductor system, apparatus,or device, or any suitable combination of the foregoing. More specificexamples (a non-exhaustive list) of the computer readable storage mediumwould include the following: an electrical connection having one or morewires, a portable computer diskette, a hard disk, a random access memory(RAM), a read-only memory (ROM), an erasable programmable read-onlymemory (EPROM or Flash memory), an optical fiber, a portable compactdisc read-only memory (CD-ROM), an optical storage device, a magneticstorage device, or any suitable combination of the foregoing. In thecontext of this document, a computer readable storage medium may be anytangible medium that can contain, or store a program for use by or inconnection with an instruction execution system, apparatus, or device.

Referring to FIG. 1, a conventional architecture of a client-serverenvironment 1 for sending requests to a database 5 is illustrated. Aplurality of clients 2 a-2 e is connected to the network 3. In addition,a server 4 is connected to the network 3 as well. The network 3, whichmay be composed from several sub-networks, enables the clients 2 a to 2e and server 4 to communicate with each other. For example, the client 2a sends a request to the server 4 over the network 3 for accessing thedatabase 5. The server 4 may receive multiple requests from multipleclients and typically processes them in the order of receipt, or inother cases, according to a predefined prioritization policy. Requestsqueued in the server 4 wait their turn to be processed by the server 4.Once processed by the server 4, the response to the request is sent tothe client 2 a-2 e.

Referring to FIG. 2, a typical queue 10 handled by the server 4 isshown. A queue may have a depth of “QS” locations, where each locationis capable of storing one client's request prior to its scheduledprocessing by the server 4. New client requests are placed at the firstavailable slot in queue 10. This means that if slots “1” through “3” aretaken by previous requests, a new client request will be placed in slot“4”. Similarly, if the queue 10 is filled up to and including slot“i−1”, then the next-to-be filled up slot is slot “i”. Preferably,client requests are always taken for processing from the first slot inthe queue 10, i.e., slot “1”. When queue 10 is full, i.e., slot “QS” istaken, the server 4 will refuse to receive new requests from clients.

To avoid breakdown of system performance because of resource-consuminglock handling and timeout of requests and/or because of waiting timeexceeding a default time value triggering the removal of the request outof the queue, a sophisticated way of adjusting the maximum number ofconcurrent requests and the maximum length of the at least one queue isexplained by means of FIGS. 3 to 5.

FIG. 3 shows a schematic diagram of the server 4. The server 4 includesat least a communication layer 41 and a data access layer 42. Anincoming request 20 is handled by a dispatcher 43 which is associatedwith the communication layer 41. To avoid locking between differentrequests, the incoming requests are preferably assigned to differentgroups. The dispatcher 43 performs a classification of the incomingrequest and the assignment to a particular group. Each group includesits own queue, in which the requests are inserted.

There are different ways for grouping the incoming requests 20. Thesimplest one is that there is only one group because it is assumed thatevery request may lock with any other request. A second way is to groupthe requests according to the service which caused the request. It isassumed that a request coming from a particular service is likely tolock with another request from the same service and rather unlikely tolock with a request caused by another service. Following the second waythere is a relation between the communication service ID and the group,the request is assigned to. According to a third, more advanced way, alearning mechanism is implemented within the dispatcher 43. The learningmechanism will analyze the exception stack to find out, why a particularexception occurred. If the exception was caused because of locking ofrequests, the services which interfere with each other can bedetermined. The goal is to investigate the likelihood of locking ofrequests based on the origin of the request, the service ID etc.

A lock group manager 44 is assigned to each group of requests, i.e. toeach queue. The lock group manager 44 includes a measuring unit whichpreferably continuously measures the processing performance of thegroup. Furthermore a maximum value SS of concurrent requests isassociated with each queue or group respectively. Preferably, themaximum value SS of concurrent requests is handled using a countingsemaphore. The semaphore can be tested for its state, for example openor close, and for its value, i.e. the maximum number SS of concurrentrequests. Thereby it is possible to determine, if an incoming requestassigned to a group can be inserted into the queue (open/close) or hasto be rejected and additionally the maximum value SS of concurrentrequests can be retrieved.

The measuring unit continuously monitors the number of incoming requestassigned to the respective group, the at least one queue utilizationparameter, the length of the queue and the number of rejected requestsNoRR. As mentioned above, the at least one queue utilization parametercan be the average processing time APT of requests, the number of servedrequests, the number of rejected requests, the ratio of rejectedrequests with respect to the total number of requests in a certainperiod of time or a parameter based on a calculation combining at leasttwo of the upper mentioned parameters etc. Furthermore, the at least onequeue utilization parameter can be derived from an information about thestatistical distribution of time needed to process a request, e.g.minimum processing time, maximum processing time, range of processingtime, deviation of processing time, variation of processing time, etc.In the following embodiments of the invention, the average processingtime APT is used as queue utilization parameter.

Based on this evaluated characteristics of a previous period of time,hereinafter also referred to as measurement period MP, the number ofconcurrent requests leading to the maximum value of the product ofaverage processing time APT and number of concurring requests SS(APT*SS) is determined. A person skilled in the art of database systemsrecognizes that there is an optimum of the product of average processingtime APT and number of concurring requests SS. Both parameters influenceeach other. Starting with a small number of concurring requests SS theaverage processing time APT is only marginally influenced when thenumber of concurring requests SS is rising, but at a greater number ofconcurring requests SS the average processing time APT is rapidlydecreasing. So an optimum can be found, at which the multiplicationproduct of number of concurring requests SS and average processing timeAPT has its maximum. The maximum value SS of concurrent requests is usedto enable a request to be inserted in the queue associated to the group,in which the request was assigned to by the dispatcher 43. If the numberof requests contained in the respective queue is smaller than themaximum value SS of concurrent requests, the request will be queued orimmediately processed. Otherwise the request will be rejected.

Furthermore the measuring unit deduces a maximum value of queue size QSfor the current measurement period MP(act) using the evaluatedcharacteristics of a previous measurement period MP(act)−ΔMP. Themaximum value of queue size QS is defining a maximum number of requestswhich can be contained in the respective queue and which will getprocessed within a predefined time period.

Referring to FIG. 4 a flow chart for adapting the queue propertiesinfluencing the performance of the respective group is shown. Theprocess of adapting the queue properties is usually started usinginitial values 30. Those initial values may be predetermined parametervalues or values deduced of prior process running. The processing timeof a respective group is quantized in measurement periods MP duringwhich statistics regarding the group performance are collected. Ameasurement period MP lasts a period of time ΔMP. To get reliablestatistics, the measurement period MP has to exceed a certain period oftime. The measurement period MP may be greater than the averageprocessing time APT of a request, preferably greater than themultiplication product of maximum value SS of concurrent requests andaverage processing time APT (SS*APT).

After starting with initial values 30, statistics about the groupprocessing performance are collected during a first measurement periodMP(act) (step 31). Thereby the number of incoming requests assigned tothe respective group, the average processing time APT, the length of thequeue and the number of rejected connections is monitored by themeasuring unit. Following up, optimized queue values are determined 32based on the collected statistics of the first measurement periodMP(act). In a further process step the properties of the respectivequeue are adapted (step 33) according to the optimized queue valuesdetermined in step 32. Preferably the maximum value SS of concurrentrequests and the maximum value of queue size QS is adapted. Also theduration of the measurement period MP or further process parameters canbe adapted dynamically based of the collected statistics. After adaptingthe queue properties the process is continued at step 31 in a secondmeasurement period MP (MP(act)=MP(act)+ΔMP) using the queue specificproperties determined during the first measurement period MP.

FIG. 5 shows in detail a routine for adapting the queue properties basedon statistics collected during the prior measurement period MP. Firstthe number of rejected requests NoRR in the current measurement periodMP(act) is checked. If there were no rejected requests, NoRR=0, i.e. allrequests are handled promptly. If requests were rejected during thecurrent measurement period MP(act), the performance factor PF of theprevious measurement period MP(act−ΔMP) is compared with the performancefactor PF of the current measurement period MP(act). The performancefactor PF is an indicator for the current processing performance of thegroup. The performance factor PF is mainly calculated based on themaximum value SS of concurrent requests and the average processing timeAPT. For example the performance value can be calculated by thefollowing formula:

${P\; F} = {\frac{SS}{A\; P\; T}.}$

The performance value may also be calculated in a more sophisticatedway.

For sake of clarity the example embodiment is monitoring only theaverage processing time of requests, but in real system it may beadvantageous to collect more information about statistical distributionof time needed to process a request e.g. minimum, maximum, range,deviation, variation, etc. Those values can be then used for moresophisticated method of computing the performance value.

If PF(MP(act−ΔMP))>PF(MP(act)), i.e. the group performance decreasedwith respect to the previous measurement period MP(act−ΔMP), the maximumnumber SS of concurrent requests may be reduced (SS=SS−1) to lower theserver's load. Reducing the maximum number SS of concurrent requestsdoes not immediately reduce the number of requests in the respectivequeue. Preferably, the number of requests is slowly decreased byprocessing the requests already contained in the queue without insertingfurther requests until the number of requests contained in the queue issmaller than the reduced maximum number SS of concurrent requests.

If PF(MP(act−ΔMP))<PF(MP(act)), i.e. the group performance increasedwith respect to the previous measurement period MP(act−ΔMP), the maximumnumber SS of concurrent requests is increased (SS=SS+1) to raise theserver's load and therefore optimizing the system performance. In otherwords, it is further attempted to increase the number of requests to beprocessed within a reference period.

In a further step it is checked whether

${{{QS} \cdot \frac{A\; P\; {T\left( {M\; {P({act})}} \right)}}{SS}} > t_{default}},$

where QS is the maximum length of the queue at which all the requests ofthe queue get processed without causing a timeout and tdefault is adefault period of time after which a timeout is caused. If theinequality is true, the maximum length of the queue QS is decreased toavoid timeout.

If

${{{QS} \cdot \frac{A\; P\; {T\left( {M\; {P({act})}} \right)}}{SS}} < t_{default}},$

the maximum length of the queue QS is increased to enable more requeststo be inserted into the queue.

By iterating the routine according to FIG. 5, the maximum number SS ofconcurrent requests and the maximum length of the queue QS are optimizedto achieve the maximum system performance.

To react as quick as possible to a lock-timeout-event caused byexceeding a time limit for processing a request, a Lock-Time-outDetector 45 is used. The Lock-Time-out Detector 45 is an emergencymechanism, which is located in the database access layer. TheLock-Time-out Detector 45 captures and analyses the lock-timeout-event,for example a SQL-Exception, and determines which request was canceled.Following up, the Lock group manager 45 handling the request is promptedto adjust the respective queue parameters to avoid further time-outs.For example, the maximum length of the queue QS and the maximum numberSS of concurrent requests is dramatically reduced to counteract theperformance degradation. Preferably the maximum length of the queue QSis set to QS=0 and the maximum number SS of concurrent requests is setto SS=1. The system is enabled to handle a small number of requestswithout suffering from lock timeouts. As system performance increasesthe number of concurrent requests is also increased to achieve anoptimal system performance, i.e. the parameters will slowly increaseduring consecutive measurement periods MP.

While the foregoing has been with reference to particular embodiments ofthe invention, it will be appreciated by those skilled in the art thatchanges in these embodiments may be made without departing from theprinciples and spirit of the invention, the scope of which is defined bythe appended claims.

What is claimed is:
 1. A computer-implemented method for limiting thenumber of concurrent requests in a database system, thecomputer-implemented method comprising: defining a maximum value (SS) ofconcurrent requests corresponding to at least one queue, wherein themaximum value (SS) of concurrent requests is chosen to maximize theproduct of the number of concurrent requests and an average processingtime of requests (APT); monitoring at least one queue utilizationparameter corresponding to the at least one queue and calculating aperformance value (PF) based on the at least one queue utilizationparameter; adapting the maximum value (SS) of concurrent requests of theat least one queue dynamically based on the performance value (PF) inorder to improve system performance; and limiting the number ofconcurrent requests of the at least one queue dynamically based on thedynamically adapted maximum value (SS).
 2. The method of claim 1,wherein the requests are grouped in at least two groups, wherein eachgroup is associated with a dedicated queue and a queue-specific maximumvalue (SS) of concurrent requests.
 3. The method of claim 2, wherein arequest is assigned to a group based on the likelihood of locking of therequest with other requests contained in the group, based on the originof the request or based on the service type of the request.
 4. Themethod of claim 2, wherein a learning mechanism is implemented to deriveinformation about the cause of an exception and to distribute therequests among the at least two groups based on the derived information.5. The method of claim 1, wherein the number of concurrent requests islimited by rejecting incoming requests before insertion in the queueand/or by removing requests out of the queue.
 6. The method of claim 1,wherein the performance value (PF) is calculated for a first period oftime (MP(act)−ΔMP), wherein the performance value (PF) of the firstperiod of time (MP(act)−ΔMP) is used to adapt the maximum value (SS) ofconcurrent requests in a second period of time (MP(act)), whichimmediately follows after the first period of time (MP(act)−ΔMP).
 7. Themethod of claim 1, wherein the maximum length (QS) of the at least onequeue is adapted dynamically based on the maximum value (SS) ofconcurrent requests, the queue utilization parameter and a timeoutvalue.
 8. The method of claim 1, wherein after receiving a lock time-outof the database the maximum value (SS) of concurrent requests and themaximum length (QS) of the at least one queue is decreased in order toavoid further lock time-outs.
 9. A computer program product for limitingthe number of concurrent requests in a database system, the computerprogram product comprising: one or more computer-readable storage mediaand program instructions stored on the one or more computer-readablestorage media, the program instructions comprising: program instructionsto define a maximum value (SS) of concurrent requests corresponding toat least one queue, wherein the maximum value (SS) of concurrentrequests is chosen to maximize the product of the number of concurrentrequests and an average processing time of requests (APT); programinstructions to monitor at least one queue utilization parametercorresponding to the at least one queue and calculating a performancevalue (PF) based on the at least one queue utilization parameter;program instructions to adapt the maximum value (SS) of concurrentrequests of the at least one queue dynamically based on the performancevalue (PF) in order to improve system performance; and programinstructions to limit the number of concurrent requests of the at leastone queue dynamically based on the dynamically adapted maximum value(SS).
 10. The computer program product of claim 9, wherein the requestsare grouped in at least two groups, wherein each group is associatedwith a dedicated queue and a queue-specific maximum value (SS) ofconcurrent requests.
 11. The computer program product of claim 9,wherein the number of concurrent requests is limited by rejectingincoming requests before insertion in the queue and/or by removingrequests out of the queue.
 12. The computer program product of claim 9,wherein the performance value (PF) is calculated for a first period oftime (MP(act)−ΔMP), wherein the performance value (PF) of the firstperiod of time (MP(act)−ΔMP) is used to adapt the maximum value (SS) ofconcurrent requests in a second period of time (MP(act)), whichimmediately follows after the first period of time (MP(act)−ΔMP). 13.The computer program product of claim 9, wherein the maximum length (QS)of the at least one queue is adapted dynamically based on the maximumvalue (SS) of concurrent requests, the queue utilization parameter and atimeout value.
 14. The computer program product of claim 9, whereinafter receiving a lock time-out of the database the maximum value (SS)of concurrent requests and the maximum length (QS) of the at least onequeue is decreased in order to avoid further lock time-outs.
 15. Acomputer system for limiting the number of concurrent requests in adatabase system, the computer system comprising: one or more computerprocessors, one or more computer-readable storage media, and programinstructions stored on the one or more computer-readable storage mediafor execution by at least one of the one or more processors, the programinstructions comprising: program instructions to define a maximum value(SS) of concurrent requests corresponding to at least one queue, whereinthe maximum value (SS) of concurrent requests is chosen to maximize theproduct of the number of concurrent requests and an average processingtime of requests (APT); program instructions to monitor at least onequeue utilization parameter corresponding to the at least one queue andcalculating a performance value (PF) based on the at least one queueutilization parameter; program instructions to adapt the maximum value(SS) of concurrent requests of the at least one queue dynamically basedon the performance value (PF) in order to improve system performance;and program instructions to limit the number of concurrent requests ofthe at least one queue dynamically based on the dynamically adaptedmaximum value (SS).
 16. The computer system of claim 15, wherein therequests are grouped in at least two groups, wherein each group isassociated with a dedicated queue and a queue-specific maximum value(SS) of concurrent requests.
 17. The computer system of claim 15,wherein the number of concurrent requests is limited by rejectingincoming requests before insertion in the queue and/or by removingrequests out of the queue.
 18. The computer system of claim 15, whereinthe performance value (PF) is calculated for a first period of time(MP(act)−ΔMP), wherein the performance value (PF) of the first period oftime (MP(act)−ΔMP) is used to adapt the maximum value (SS) of concurrentrequests in a second period of time (MP(act)), which immediately followsafter the first period of time (MP(act)−ΔMP).
 19. The computer system ofclaim 15, wherein the maximum length (QS) of the at least one queue isadapted dynamically based on the maximum value (SS) of concurrentrequests, the queue utilization parameter and a timeout value.
 20. Thecomputer system of claim 15, wherein after receiving a lock time-out ofthe database the maximum value (SS) of concurrent requests and themaximum length (QS) of the at least one queue is decreased in order toavoid further lock time-outs.